#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    float a;
    char b;
    cin >> a >> b;
    int ret = 0;
    if (b == 'y')
        ret += 5;
    if (a <= 1)
        ret += 20;
    else
    {
        int tem = ceil(a-1);
        ret+=20+tem;
    }
    cout << ret;
}
// 64 位输出请用 printf("%lld")